package io.ai.arch.java.ai.agentic.patterns.workflow.EvaluatorOptimizer;

import lombok.RequiredArgsConstructor;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

//@Component
@RequiredArgsConstructor
public class EvaluatorOptimizerBean implements ApplicationRunner {
    private final EvaluatorOptimizer evaluatorOptimizer;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        EvaluatorOptimizer.RefinedResponse refinedResponse = evaluatorOptimizer.loop("""
					<user input>
					Implement a Stack in Java with:
					1. push(x)
					2. pop()
					3. getMin()
					All operations should be O(1).
					All inner fields should be private and when used should be prefixed with 'this.'.
					</user input>
					""");

        System.out.println("FINAL OUTPUT:\n : " + refinedResponse);
    }
}
